<!DOCTYPE html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <title>数据统计</title>
    <meta name="description" content="">
    <meta name="HandheldFriendly" content="True">
    <meta name="MobileOptimized" content="320">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui, user-scalable=no">
    <meta http-equiv="cleartype" content="on">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/assets/public/layermobile/css/layer.css">
    <link rel="stylesheet" href="/assets/doorctrl/css/style.css"/>
    <link rel="stylesheet" href="/assets/doorctrl/css/fonts.css"/>
</head>
<body>
<div class="wraper">
    <div class="header font-16 flex padding">
        <a href="/Doorctrl/DoorctrlStat/index/doorctrlId/{BEESCRM:$doorctrlId}" style="color:#fff;">
            <div class="iconfont icon-zuo font-24"></div>
        </a>
        <div class="seek-name"><input type="text" class="search" placeholder="请输入学生姓名搜索" style="color:#2a2a2a" /></div>
        <span class="dosearch">搜索</span>
    </div>
    <div class="title font-gray">昨日晚归人员 <span class="Today">{BEESCRM:$Think.const.NOW_TIME-86400|date='Y-m-d', ###}</span></div>
    <div class="scroll-box">
    <volist name="lateBack" id="vo">
        <div class="box Student title">
            <div class="flex">
                <div>
                    <p>{BEESCRM:$vo.real_name}</p>
                    <p class="margin-8 font-gray font-12"><span>{BEESCRM:$vo.dept}</span> <span class="margin-l18">{BEESCRM:$vo.mobile}</span>
                    </p>
                </div>
                <div class="iconfont icon-zhankai"></div>
            </div>
            <div class="prove font-12 hide">
                <span>{BEESCRM:$recordEndTime|date='Y-m-d H:i', ###}</span>
                <span class="pull-right">由系统确认晚归</span>
            </div>
        </div>
    </volist>
    </div>
    <div style="padding: 20px"></div>
    <p class="font-12 font-gray NO-post">没有更多记录了</p>
</div>
<input type="hidden" id="doorctrlId" name="doorctrlId" value="{BEESCRM:$doorctrlId}" />
<script src="/assets/public/jquery-2.1.0.min.js"></script>
<script>
    $(function () {
        var height = $(window).height();
        $('.wraper').css('minHeight', height);
    })

    $(document).on("click",".flex",function(){
        $(this).nextAll(".prove").toggleClass("show");
        $(this).parent(".Student").siblings().children(".prove").removeClass("show");
        $(this).children(".iconfont").toggleClass("rotate");
        $(this).parent(".Student").siblings().children(".flex").children(".iconfont").removeClass("rotate");
    })

    //按学生姓名搜索
//    $(".search").bind('input propertychange', function () {
    $(".dosearch").click(function () {
        var doorctrlId = $("#doorctrlId").val();
        var username = $(".search").val().trim();
        $.ajax({
            url : '/doorctrl/DoorctrlLate/getLateBackUserByName/doorctrlId/' + doorctrlId,
            type : 'post',
            data : {username : username},
            dataType : 'json',
            success : function (result) {
                var html = '';
                if (result.status == 'S'){
                    if (result.message){
                        $.each(result.message, function (key, value) {
                            html += '<div class="box Student title"> ' +
                                    '<div class="flex"> ' +
                                    '<div> ' +
                                    '<p>'+ value.real_name +'</p> ' +
                                    '<p class="margin-8 font-gray font-12"><span>'+ value.dept +'</span> <span class="margin-l18"></span> ' +
                                    '</p> ' +
                                    '</div> ' +
                                    '<div class="iconfont icon-zhankai"></div> ' +
                                    '</div> ' +
                                    '<div class="prove font-12 hide"> ' +
                                    '<span>' + value.record_end_time + '</span> ' +
                                    '<span class="pull-right">由系统确认晚归</span> ' +
                                    '</div> ' +
                                    '</div>'
                        })
                    }
                    $(".scroll-box").html(html);
                }else if(result.status == 'F'){

                }
            }
        });
    });
</script>
</body>
</html>